/* This page dynamically generates a list of a particular customer's current
video rentals. The customer is indicated by the CLIENT.customerID property.
The customerID is set when the user signs in (see "client.htm").
*/
/* If the customerID property has been set, generate the table of rentals. Otherwise, redirect the user to sign in page, client.htm.
*/
if(client.customerID != null)
{
var userId = unscramble(client.userId)
var bucket = project.sharedConnections.connections[userId]
var connection = bucket.connection
cursor = connection.cursor("select * from rentals, videos where rentals.returnDate IS NULL AND rentals.videoId = videos.id AND rentals.customerId = " + client.customerID);
}
else
{
redirect("client.htm");
}